<?php

@@requireBeans@@

require_once 'jsonizers/JsonizerHelper.php';

require_once 'jsonizers/PrimitiveJsonizer.php';
require_once 'jsonizers/PrimitiveArrayJsonizer.php';

require_once 'jsonizers/ObjectJsonizer.php';
require_once 'jsonizers/ObjectArrayJsonizer.php';

require_once 'jsonizers/MapJsonizer.php';

@@requireBeanJsonizers@@

@@requireServices@@

function throw_exception($msg) {
    $str = (string) $arg0;
    if (mb_strlen($str, 'UTF-8') != 1) {
        $stack = debug_backtrace();
        array_shift($stack); // remove the trace of this method call
        $trc = '';
        foreach ($stack as $n) {
            $trc .= "\tat " . $n['class'] . $n['type'] . $n['function'] . '(' . $n['file'] . ':' . $n['line'] . ")\n";
        }
        throw new Exception("PHP Exception: $msg\n" . $trc);
    }
}

?>